//
//  TestViewController8.h
//  MSDemo
//
//  Created by ms on 2024/3/15.
//

#import "MSViewController.h"

NS_ASSUME_NONNULL_BEGIN

/** 本地存储 */
@interface TestViewController8 : MSViewController

@end


@interface ItemCateModel : MSDataBaseModel

@property (nonatomic, copy) NSString *name; ///< 货品分类名称
@property (nonatomic, assign) BOOL isDel;   ///< 是否已删除，记录货品分类删除状态

@end

@interface ItemModel : MSDataBaseModel

@property (nonatomic, copy) NSString *name; ///< 货品名称
@property (nonatomic, strong) NSData *image; ///< 货品图片
@property (nonatomic, copy) NSString *introduce; ///< 货品介绍
@property (nonatomic, assign) NSInteger expirationTime; ///< 货品过期时间
@property (nonatomic, assign) NSInteger catePk; ///< 货品分类主键
@property (nonatomic, copy) NSString *cateName; ///< 货品分类名称
@property (nonatomic, strong) NSNumber *line; ///< 货品货架号
@property (nonatomic, strong) NSNumber *number; ///< 货品编号
@property (nonatomic, assign) NSInteger addTime;   ///< 货品入库时间
@property (nonatomic, assign) NSInteger updateTime;   ///< 货品更新时间
@property (nonatomic, assign) BOOL isDel;   ///< 是否已删除，记录货品删除状态

@end

@interface ItemViewModel : MSViewModel

@property (nonatomic, strong) RACCommand *addItemCateCommand;
@property (nonatomic, strong) RACCommand *delItemCateCommand;
@property (nonatomic, strong) RACCommand *addItemCommand;
@property (nonatomic, strong) RACCommand *delItemCommand;

/** 临时存储要添加的商品分类 */
@property (nonatomic, strong) ItemCateModel *addItemCateModel;
/** 临时存储要添加的商品 */
@property (nonatomic, strong) ItemModel *addItemModel;
/** 商品 */
@property (nonatomic, strong) NSMutableArray<ItemModel *> *itemModels;
/** 商品分类 */
@property (nonatomic, strong) NSMutableArray<ItemCateModel *> *itemCateModels;

@end

@interface ItemCateView : MSView

@end

NS_ASSUME_NONNULL_END
